package cn.iocoder.yudao.module.book.controller.app.community.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Schema(description = "APP - 社区动态创建请求 VO")
@Data
public class CommunityPostCreateReqVO {

    @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "我的学习心得")
    @NotBlank(message = "标题不能为空")
    @Size(max = 100, message = "标题长度不能超过100个字符")
    private String title;

    @Schema(description = "内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "今天学习了...")
    @NotBlank(message = "内容不能为空")
    private String content;

    @Schema(description = "分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "study")
    @NotBlank(message = "分类不能为空")
    private String category;

    @Schema(description = "图片URL列表", example = "[\"http://example.com/image1.jpg\"]")
    private List<String> images;

    @Schema(description = "话题标签列表", example = "[\"英语学习\", \"绘本阅读\"]")
    private List<String> tags;

    @Schema(description = "学习数据")
    private StudyDataVO studyData;

    @Schema(description = "关联绘本ID", example = "123")
    private Integer relatedBookId;

    @Schema(description = "关联绘本集ID", example = "456")
    private Integer relatedCollectionId;

    @Schema(description = "关联打卡记录ID", example = "789")
    private Integer relatedClockId;

    @Schema(description = "学习数据 VO")
    @Data
    public static class StudyDataVO {
        @Schema(description = "学习时长", example = "1小时30分")
        private String duration;

        @Schema(description = "阅读页数", example = "25页")
        private String pages;

        @Schema(description = "学习内容", example = "学习了英语单词")
        private String content;
    }

}
